package lanqiao;

public class PrimeFactor {
    public static void main(String[] args) {
        int num = 2024;
        int count = 0;
        //2是4的约数，4是2的倍数
        for (int i = 2; i < num; i++) {
            if(isPrime(i) && num % i == 0) {
                count++;
            }
        }
        System.out.println(count);
    }
    //2 3 5 7 11 13 17 19 23 29
    private static boolean isPrime(int n) {
        if(n < 2) return false;
        for (int i = 2; i * i <= n; i++) {
            if(n % i == 0) return false;
        }
        return true;
    }
}
